import { createApp } from 'vue'
import App from './App.vue'
import router from "./router"
import ElementPlus from "element-plus";
import "element-theme-ink";
import './mock/index'

// import Echart from 'echarts

// App.prototype.$echarts = Echart;

createApp(App).use(ElementPlus).use(router).mount('#app')

// ---------------
// 解决 vue3+vite+typescript项目下，vue-devtools不生效问题
// *需要安装vue-devtools beta版
const app = createApp(App)
const win: any = window // 
if (process.env.NODE_ENV === 'development') {
  if ('__VUE_DEVTOOLS_GLOBAL_HOOK__' in win) {
    // 这里__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue赋值一个createApp实例
    win.__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue = app
  }
}
// ---------------